﻿@{
    ViewBag.Title = "Book new cargo";
}
<h2>
    Book new cargo</h2>
<p>
    Use the form below to book a new cargo.
</p>
@Html.ValidationSummary()
@using (Html.BeginForm())
{
    <div>
        <fieldset>
            <legend>Cargo information</legend>
            <p>
                <label for="origin">Origin:</label>
                @Html.DropDownList("origin")
            </p>
            <p>
                <label for="destination">Destination:</label>
                @Html.DropDownList("destination")
            </p>
            <p>
                <label for="arrivalDeadline">Arrival deadline:</label>
                @Html.TextBox("arrivalDeadline")
                @Html.ValidationMessage("arrivalDeadline", "*")
                <div type="text" id="arrivalDeadlineDatepicker">
                </div>
            </p>
            <p>
                <input type="submit" value="Book" />
            </p>
        </fieldset>
    </div>
}
@section scripts
{
<script type="text/javascript">
    $(document).ready(function () {
        $("#arrivalDeadlineDatepicker").datepicker({ altField: '#arrivalDeadline' });
    });
</script>
}
